import java.io.UnsupportedEncodingException;

public class demo1 {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String s="abc";
        byte[]arr=new byte[1024];
        for (int i = 0; i <s.length() ; i++) {
            arr=s.getBytes();//返回类型为byte[]
        }
        int sum=0;
        for (int i = 0; i < arr.length ; i++) {
            sum+=arr[i];
        }
        System.out.println(sum);
    }
}
